#include<iostream> 
using namespace std; int n; int main(){ cin>>n; if(n==2||n==4){printf("-1");exit(0);}if(n%2==0){printf("%d\n",n/2);for(int i=1;i<=n/2-1;i++){printf("%d ",i);}printf("%d",n/2+1);}else{printf("%d\n",(n+1)/2);for(int i=1;i<=(n+1)/2;i++){printf("%d ",i);}}return 0;}
